from flask_script import Manager
from app import create_app
from flask import render_template

app = create_app()
manager = Manager(app)

@app.errorhandler(404)
def page_not_found(e):
    return render_template('errors/404.html'), 404

@manager.command
def adminTest():
    from app import test
    app = test.test_admin()
    app.run()

if __name__ == '__main__':
    manager.run()